home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_06
/
9n06057a
< prev
next >
Wrap
Text File
|
1991-02-23
|
869b
|
46 lines
//
// class IntThing -- an integer thing derived from
// class Thing.
//
// Version 1.01 -- 2/25/91
//
// Michael Kelly -- Author
//
#if !defined(TH_INT_HPP)
#define TH_INT_HPP
#include "thing.hpp"
class IntThing : public Thing {
public:
IntThing()
{
thing = new int(0);
}
IntThing( int some_thing )
{
thing = new int(some_thing);
}
long type()
{
return ( (long)IntType << 16) | sizeof(int);
}
operator int() { return *( (int *)ptr() ); }
void print();
int printable() { return 1; }
int sortable() { return 1; }
operator ==(Thing &some_thing);
operator !=(Thing &some_thing);
operator < (Thing &some_thing);
operator <=(Thing &some_thing);
operator > (Thing &some_thing);
operator >=(Thing &some_thing);
};
#endif